The application of digital techniques to the creation of waveforms has allowed the development of equipment able to produce, with precision, a wide variety of waveforms that are difficult to produce with purely analog techniques. It is now routine for a ‘function generator’ to create, whether as single cycles or continuously, all manner of waveforms, such as sine, triangle, sawtooth and square wave, as well as instances of waveforms with an arbitrarily defined shape. Furthermore, whatever can be generated as a ‘regular and periodic’ waveform can also be the object of a swept format, where over some period of time whatever ‘rates of change’ might describe the waveform (periods or frequency, rise times) appear to vary in some controlled fashion. For example, the frequency of a sine wave might vary uniformly from F0−Δ to F0+Δ many times a second while an operator views a display of, say, the frequency response of some network. During this operation the operator may wish to vary the value of either of Δ or F0; in such a case the ‘sweep’ (variation of F by Δ) might best be linear with time. In another case the urge may be to sweep from F1 to F2, while still another it might be desirable if the change in F were logarithmic with time. Today's operators of function generators are accustomed to configuring all manner of such parameters (including triggering, phase control, etc.) merely by pressing a few controls on the front panel. Such flexibility (not to mention the issue of genuine precision) cannot be obtained in equipment produced for commercial use that employs purely analog techniques.
One of the most widely used digital techniques for the creation of waveforms is to have at hand a digitized version of the desired waveform and apply it to a DAC (Digital to Analog Converter). In principle, one could use computational resources to compute the digital values as they are needed, in real time at the rate they are needed. In other cases, pre-computed values (e.g., a generic sine, generic sawtooth, etc.) are stored ahead of time in a memory and merely accessed at the rate needed. In another setting, some existing analog signal of interest might first be digitized, perhaps operated upon, and the resulting sequence of digital values applied to the DAC.
There are a number of other digital synthesis techniques that might be used in function generators and for the generation of waveforms in other, non-test equipment, settings. But the one just mentioned is of particular interest, so we will dwell on it for a bit.
As a point of departure, let us imagine a fictitious simple case where a sine wave is to be generated for the first time ever, while using this technique. And while we might wish for anything we want, our labors are within the framework of some enterprise that has placed its own valuation upon the consumption of resources. We approach the powers that be and inquire about what ‘clearly’ ought to be (at least, so we think at present) the most important element of this synthesis scheme: “Say, Boss, what about the DAC we are supposed to use . . . .” We are told to keep costs under control, try eight or ten bits with good to excellent linearity, BUT, using production parts only (and NO selection of the best parts out of large lots, etc.). We shall assume that speed of operation is not a determinative issue by itself, and that if it costs more to use a fast DAC when fast is necessary, well then, that is just the way it is, and is understood and acceptable to our boss. To this point no one has provoked us with any rude questions about a filter, and we naively proceed without having considered any such issue.
It is clear that if we use, say, ten bit parts, the amplitude axis will be divided into 210, or one thousand twenty-four, full scale values. With an eye on the time axis, we also enquire about memory resources. It is suggested that what works for resolution in one axis should be an adequate minimum for another. So we compute one thousand twenty-four consecutive evenly spaced values for the sin(x) over one period, and put them into a table.
Some obvious issues emerge. The frequency of the resulting sine wave will depend upon how often we apply the next value to the DAC. So, if we run through all thousand twenty-four input values in one microsecond the output of the DAC for that microsecond will represent one cycle of a one megahertz sine wave. Clearly, we can create as much or as little of the ‘template’ stored in memory as desired: We can create any desired fraction of a single cycle, a single cycle that starts and stops at any desired location on the waveform, and continuous trains of consecutive cycles, all by proper sequencing of the addresses applied to the memory containing the template. To create a five megahertz sine wave we would speed things up by a factor of five. We need a way to scale the output, so as to be able to produce different amplitudes. We are suspicious of scaling the values before they are applied to the DAC, as this appears to waste available resolution. But control of the power supplies to the DAC, and variable gain amplification or variable attenuation of the DAC's output, are all fair game in this department, and it appears that they work just fine.
Some other issues arise, too. We give a prototype of our one megahertz sine wave generator to a friend in the next cube who also happens to have a state of the art spectrum analyzer. Half an hour later we hear her exclaim: “WOW! There's a huge family of harmonics in this thing right out to the microwave region, and some are only about fifteen dB down . . . did you guys do that on purpose?”
“Well, . . . no. We didn't.”
Despite the fact that it is not easily seen on an oscilloscope, it does not take long to discover the source of the trouble: our DAC is creating a stair-step approximation of a sine wave, and even though they are small ( 1/1024 of full scale) the transitions are, in keeping with what is expected of a high quality DAC, very abrupt. Those sharp edges represent, or contain, high frequency components that are not properly part of our one megahertz signal. Clearly, we need to condition the output of the DAC with a suitable low pass filter. Much to our relief, a low pass filter does indeed clean up the output.
In fact, it would appear that, properly chosen, the filter does more than just get rid of pesky harmonics: a low pass filter is a transformative mechanism that progressively discriminates against frequency components according to the amount they exceed some cut-off frequency Fc. Let us suppose we are generating a pure sine wave at F1, and choose Fc to be a little above F1. The removal of those frequency components above F1 smoothes the output of the DAC, and in so doing provides an interpolation in real time of what would otherwise appear as the point-to-point ‘corners’ on the edge of the staircase. The unfiltered staircase shaped waveform laden with harmonics now becomes instead a sequence of smoothly connected ramp-like segments. For sine waves, measurable distortion can actually become quite low. Further inquiry and analysis leads us to appreciate that, for sine wave generation, we can indeed rely on the filter to a fairly large extent, and relax the number-of-bits/DAC-resolution. And for essentially the same reasons, we can also reduce the number of points along the waveform that are stored in memory. (We are now, however, informed by Nyquist and Fourier, and appreciate that such relaxations pertain only for frequencies at or above the highest frequency considered in a complex waveform's decomposition. And, we also remain mindful that modulated sine waves are indeed ‘complex’ and not ‘pure’ sine waveforms.) For these and other reasons, this form of waveform synthesis has since become quite popular, provided proper attention is paid to this notion of the highest frequency of interest in a complex waveform's decomposition.
Indeed, there are other applications besides test equipment-style ‘function generation’ where this architecture might be used to create waveforms. Say, for example as a modulator in a radio frequency communications system, such as may be found in cellular telephones. Cellular telephony, and various other classes of radio communication service, have long since abandoned simple AM (Amplitude Modulation) in favor of various other forms of modulation that are more complex, and that are also more suited to the digital representation of content. For example, one generalized form of modulation involves discrete variations in both the amplitude and phase of a carrier signal. There are various modulation components that accept a digital input and a carrier, and produce an amplitude or phase alteration of the carrier according to the applied digital input. As one example, a proper combination of these things will produce π/4 DPSK (pronounced “pi over four differential phase shift keying”). There are other flavors of complex modulation, and we needn't get too concerned about their details, although it is useful to appreciate the notion of out of band ‘splatter.’ (Splatter is the spurious generation/radiation of power at frequencies out of the band in use, and which rudely appears as extra noise within some other band.) To prevent splatter it is often necessary to limit the rate—by filtering—at which individual amplitude and phase changes are allowed to manifest themselves in the carrier. What we can say is this: whatever style of modulation is in use (including the notion of limiting rates of change for modulation), the final modulated carrier is ultimately just a continuous waveform, and one whose individual cycles are ‘essentially’ sinusoidal, at that (that is, as individual cycles they outwardly resemble a true sinusoid, but in actual fact, they are complex to the extent they exhibit the effects of some form of modulation). That means that if we could digitally represent those individual cycles of the modulated carrier, we could synthesize that carrier, just as we did one or more cycles of our one megahertz sine wave. So, for example, we imagine an ADC (Analog to Digital Converter) that continuously digitizes applied speech, or perhaps an imaging system that converts an applied image to a formatted digital representation (as with a digital camera), and we apply a continuous (for perhaps a long while) sequence of such digitized information to a “modulation daemon” whose task is, by computational means or by other algorithmic methods, to trade the incoming digitized program material for a digitized cycle by cycle representation of what a modulated IF (Intermediate Frequency) “carrier” should be (and already including any honoring of anti-splatter filtering). We then apply this to a suitably fast DAC whose output is low pass filtered and then supplied to some using environment. For example, we might then mix the IF up to some final RF frequency carrier and then amplify it.
As desirable as this waveform generation architecture is, it is not without its difficulties. Let's say we have a DAC whose clock frequency is Fs: that is, the DAC can accept a new digital input value (we might call it a ‘sample’ occurring at a ‘sampling frequency’ Fs) and produce a new output value once every 1/Fs seconds. This DAC can be used to generate a signal Fout whose frequency content can range from DC to (Fs/2)−Fg (within the First Nyquist region) or from (Fs/2)+Fg to Fs−Fg (within the Second Nyquist region). (Ideal) Nyquist regions are the consecutive Fs/2 intervals along the frequency axis. We have shown above a practical width of these Nyquist regions. Each has been reduced by Fg, where Fg is the width of a guard band that is needed because practical filters have skirts that are not vertical, as would be the case with a so-called (and essentially unrealizable) ‘brick wall’ filter. The following three paragraphs address this need for a guard band.
It will be appreciated that this method of ‘constructing’ a signal has elements of sampling, and that one method of mixing (heterodyning) two signals is to sample one at the rate of the other. We are not surprised, therefore, to discover (as will be illustrated in connection with FIG. 1) that while generating Fout an image Fs−Fout appears within the Second Nyquist region. When Fout begins to approach Fs/2 from below the image Fs−Fout will also approach Fs/2 from above: Fout and its image approach each other with Fs/2 as the midpoint of their difference. The image will be severely attenuated or removed by the low pass filter when Fout is well below Fs/2 (beneath the guard band). However, when it falls within the guard band (somewhere on the skirt of that filter), then there is a fight between the strength of the image and the efficacy of the filter, and the presence of the image is felt. Not only that, but a practical filter ‘strong enough’ to suppress an image just above Fs/2 will also proceed to partially attenuate the associated Fout just below Fs/2, which is rather inconvenient, to say the least.
The general term describing the presence of unwanted images is “aliasing,” and in applications where a waveform is sampled to produce digital values (as in a Digital Sampling Oscilloscope) a filter used to suppress them is known as an ‘anti-aliasing’ filter. In the particular case we are interested in here (going from the digital samples to an analog waveform with a DAC) the corresponding filter is called a ‘reconstruction filter.’ In the case of waveform synthesis with a DAC the reconstruction filter removes the staircase transitions in the time domain, as well as the image in the frequency domain. This situation (the appearance of the in-band image when Fout is near Fs/2) is not unknown, and the usual solution for implementing the guard band is to not allow Fout to approach the filter's cutoff value by the width of the guard band. Say, for example, an upper limit for an Fout within the First Nyquist region might be set at about 70% or 80% of Fs/2.
Similar remarks pertain to the generation of signals within a Nyquist region above the First: there will be a guard band at each end, and the usable portion of the region is reduced by those guard bands.
It appears, then, that we are precluded from generating signals in the ‘hole(s)’ created by the guard band(s). It is as if the guard bands create a region of inaccessible spectrum.
It seems that our earlier (and fictitious) view that the DAC was essentially all we needed was both naive and incorrect. We will need at least a low pass filter even if we are operating within the First Nyquist region, and appropriate band pass filters for operation in higher Nyquist regions. It seems the filters are essential, since upon reflection we appreciate that, just as the images are there, each of the Nyquist regions ‘is there’, too, whether we intend to use them, or not! (They exist for essentially reasons similar to those explaining the images, and also stem from heterodyne theory.) Thus it is that we find conventional systems of this sort which achieve multi-region synthesis operation by switching between reconstruction filters, and these filters enforce guard bands. That works, but there is a nasty drawback: the synthesizer cannot generate signals that fall within, or approach too close to, the guard bands. So, even if we had a perfect DAC the frequency range of the system would still be limited by the guard bands in the filters to less than what is between any two consecutive Nyquist limits. We know better than to expect to have the services of a ‘perfect’ filter to reduce the width of the guard band(s) to ‘zero’! We resent having obtained a first rate DAC only to be unable to use it to its full potential because of the need for significant guard bands. We appreciate that multi-region operation is possible through filter switching, and that such operation must be stay within the Nyquist region selected, and cannot span those regions. So be it. But must we suffer the loss of valuable spectrum at the end of a region or between regions (or limit bandwidth accordingly) on account of the ‘holes’ represented by the guard bands? It seems we need a way to outfox the tyranny of the Nyquist regions without offending Mother Nature. What to do?